<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/produceinfo/goods_fittings/q_goods_fittings.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/produceinfo/goods_fittings/q_goods_fittings.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Goods_fittings',
                footer: "Foots",
                cnName: '商品配件明细单',
                name: 'goods_fittings/q_goods_fittings',
                url: "/q_goods_fittings/",
                sortName: "Goods_sub"
            });
            const editFormFields = ref({"Goods_sub":"","Goods_name":"","Remark":""});
            const editFormOptions = ref([[{"title":"产品编码","field":"Goods_sub","type":"text"},
                               {"title":"产品名称","required":true,"field":"Goods_name","type":"text"},
                               {"title":"备注","field":"Remark","type":"text"}]]);
            const searchFormFields = ref({"Goods_sub":"","Goods_name":"","AuditStatus":"","CreateDate":""});
            const searchFormOptions = ref([[{"title":"产品编码","field":"Goods_sub","type":"like"},{"title":"产品名称","field":"Goods_name","type":"like"},{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","type":"select"},{"title":"创建时间","field":"CreateDate","type":"datetime"}]]);
            const columns = ref([{field:'Goods_sub',title:'产品编码',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'Goods_name',title:'产品名称',type:'string',width:220,require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Goods_fittings',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "商品配件明细单明细",
                table: "q_goods_fittingsList",
                columns: [{field:'Goods_fittingsList',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Goods_sub',title:'商品编号',type:'string',sort:true,width:110,align:'left',sort:true},
                       {field:'Goods_name',title:'商品名称',type:'string',sort:true,width:180,align:'left'},
                       {field:'Goods_num',title:'商品数量',type:'float',sort:true,width:110,edit:{type:'number'},require:true,align:'left'},
                       {field:'Item_clsno',title:'类别',type:'string',bind:{ key:'商品分类',data:[]},width:120,align:'left'},
                       {field:'Item_brand',title:'品牌',type:'string',width:120,align:'left'},
                       {field:'Goods_size',title:'规格',type:'string',width:110,align:'left'},
                       {field:'Item_subno',title:'货号',type:'string',width:110,align:'left'},
                       {field:'Sale_price',title:'零售价',type:'decimal',width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,edit:{type:''},align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',width:110,hidden:true,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Staple_goods_sub',title:'主商品编号',type:'string',width:110,hidden:true,edit:{type:''},align:'left'},
                       {field:'Staple_goods_name',title:'主商品名称',type:'string',width:120,hidden:true,edit:{type:''},align:'left'},
                       {field:'Goods_fittings',title:'父级ID',type:'guid',width:110,hidden:true,align:'left'}],
                sortName: "Goods_sub",
                key: "Goods_fittingsList"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
